using pythagorean theorem to find missing sides